package com.example.service.webhook.business.email.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * Modified by liyang on 20171019 接口升级
 */
@JsonIgnoreProperties(ignoreUnknown=true)
public class EmailBillInstallmentList {
    @JsonProperty("total_size")
    private Integer totalSize;
    private Integer size;
    @JsonProperty("installments")
    private List<EmailBillInstallment> installments;

    public EmailBillInstallmentList() {
        this.totalSize = 0;
        this.size = 0;
    }

    public Integer getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(Integer totalSize) {
        this.totalSize = totalSize;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

	public List<EmailBillInstallment> getInstallments() {
		return installments;
	}

	public void setInstallments(List<EmailBillInstallment> installments) {
		this.installments = installments;
	}
	
	public void addInstallment(EmailBillInstallment sheet) {
        if (installments == null) {
        	installments = new ArrayList<>();
        }
        installments.add(sheet);
    }

}
